<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
	<link rel="stylesheet" type="text/css" href="/skin/css/amazeui.min1.css" />
	<link href="/skin/font/iconfont.css" rel="stylesheet" type="text/css" />
	<link href="/skin/css/index.css" rel="stylesheet" type="text/css" />
	<script src="/user/js/jquery.js"></script>
	<meta name="Keywords" content="" />
	<meta name="Description" content="" />
	<title>申请提现-会员中心</title>
<style>
/* 设计稿 375px，1rem = 100px，换算方法：px值 ÷ 100 = rem值 */
:root{ --card:#fff; --line:#eef2f7; --text:#0f172a; --muted:#9aa3b2; --primary:#253043; }
a{-webkit-tap-highlight-color:transparent;outline:none;}
body { background: #f3f5f8; }

/* 表单卡片 */
.form-card {
	background: var(--card);
	border-radius: 0.12rem;
	padding: 0.16rem;
	margin: 0.2rem;
	box-shadow: 0 0.03rem 0.18rem rgba(0,0,0,.05);
}
.form-item {
	display: flex;
	align-items: center;
	padding: 0.14rem 0;
	border-bottom: 0.01rem solid var(--line);
}
.form-item:last-child {
	border-bottom: 0;
}
.form-label {
	width: 0.88rem;
	flex: 0 0 0.88rem;
	color: #1f2937;
	font-weight: 600;
	font-size: 0.14rem;
}
.form-control {
	flex: 1;
	display: flex;
	align-items: center;
	min-width: 0;
}
.form-control input[type=text] {
	width: 100%;
	border: 0;
	background: transparent;
	outline: none;
	font-size: 0.14rem;
	color: #111827;
	padding: 0;
	margin: 0;
	-webkit-tap-highlight-color: transparent;
}
.form-control input::placeholder {
	color: #c0c7d2;
}
.form-control select {
	flex: 1;
	border: 0;
	background: transparent;
	font-size: 0.14rem;
	color: #111827;
	padding: 0;
	margin: 0;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.form-value {
	font-size: 0.14rem;
	color: #64748b;
}

/* 提示信息卡片 */
.tips-card {
	background: #fef3c7;
	border-radius: 0.12rem;
	padding: 0.16rem;
	margin: 0 0.2rem 0.2rem;
	border-left: 0.03rem solid #f59e0b;
}
.tips-title {
	font-size: 0.14rem;
	font-weight: 600;
	color: #92400e;
	margin-bottom: 0.08rem;
}
.tips-card p {
	font-size: 0.13rem;
	color: #78350f;
	line-height: 1.6;
	margin-bottom: 0.06rem;
}
.tips-card p:last-child {
	margin-bottom: 0;
}

/* 提交按钮 */
.page-actions {
	padding: 0 0.2rem 0.2rem;
}
.primary-btn {
	width: 100%;
	height: 0.48rem;
	border: 0;
	border-radius: 0.1rem;
	background: #253043;
	color: #fff;
	font-size: 0.16rem;
	font-weight: 700;
	-webkit-tap-highlight-color: transparent;
	outline: none;
}
.primary-btn:active {
	background: #1f2937;
}
</style>
<script>
	// 设计稿 375px，1rem = 100px，换算方法：px值 ÷ 100 = rem值
	(function(){
		var docEl = document.documentElement;
		var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
		function recalc() {
			var clientWidth = docEl.clientWidth;
			if (!clientWidth) return;
			docEl.style.fontSize = (clientWidth / 375 * 100) + 'px';
		}
		if (!document.addEventListener) return;
		window.addEventListener(resizeEvt, recalc, false);
		document.addEventListener('DOMContentLoaded', recalc, false);
		recalc();
	})();
</script>
</head>
<body class="body">
<div class="main">
	<div class="editzl">
		<header id="header">
			<section class="head-b head-b1">
				<span class="u-left"><a href="javascript:history.go(-1);" class="back"><img src="/skin/img/back.png"/></a></span>
				<h1 id="t0">申请提现</h1>
				<div class="u-right" href="#">
					<a href="/user/withdrawaljl.php" style="color:white;position: absolute;top:0;right:.2rem;" class="hSearch right">提现记录</a>
				</div>
			</section>
		</header>

		<form class="tixian">
			<input type="hidden" value="{$type}" name="type">
			
			<div class="form-card">
				<div class="form-item">
					<div class="form-label">会员帐号</div>
					<div class="form-control">
						<span class="form-value">{$info[uname]}</span>
					</div>
				</div>
				<div class="form-item">
					<div class="form-label">收益</div>
					<div class="form-control">
						<span class="form-value">¥{$info[jjcash]}</span>
					</div>
				</div>
				<div class="form-item">
					<div class="form-label">手机号</div>
					<div class="form-control">
						<input type="text" name="t1" placeholder="请输入联系方式" value="{$info[phone]}" />
					</div>
				</div>
				<div class="form-item">
					<div class="form-label">银行卡</div>
					<div class="form-control">
						<select name="bank">{$bank}</select>
					</div>
				</div>
				<div class="form-item">
					<div class="form-label">提现金额</div>
					<div class="form-control">
						<input type="text" name="t4" placeholder="请输入提现金额" />
					</div>
				</div>
			</div>
			
			<!-- 提现规则提示 -->
			<div class="tips-card">
				<div class="tips-title">提现规则：</div>
				<p>提现金额必须是{$set[txlimit]}的整数倍（如100、200）</p>
				{if($set['tixian']>0)}
				<p>提现收取税费{$set[tixian]}%</p>
				{/if}
				{if($set['tixian1']>0)}
				<p>提现收取手续费{$set[tixian1]}%</p>
				{/if}
			</div>
			
			<div class="page-actions">
				<button class="primary-btn" type="button" onclick="tixian();">立即申请</button>
			</div>
		</form>

		<script>
			$("select[name='bank']").change(function(){
				index = $(this).val();
				if(index==0){
					window.location.href='/user/bank_add.php';
				}
			});
			
			function tixian(){
				var phone = $("input[name=t1]").val().trim();
				if(!phone) {
					alert("请输入联系方式");
					return;
				}
				
				var amount = $("input[name=t4]").val().trim();
				if(!amount) {
					alert("请输入提现金额");
					return;
				}
				
				$.ajax({
					type:"post",
					dataType:"json",
					url:"/Moudelu.php?m=m&a=tixian",
					data:$(".tixian").serialize(),
					success:function(d){
						if(d[0]==0){
							alert(d[1]);
						}
						else{
							alert(d[1]);
							window.location.href='withdrawaljl.php';
						}
					}
				});
			}
		</script>
	</div>
</div>
{include(foot)}
</body>
</html>
